<template>
  <div class="subnavBar">
    <van-nav-bar :title="title" background="#111214" >
        <template #right>
            <van-icon name="wap-home-o" size="22" color="#fff" @click="onClickRight"/>
        </template>
        <template #left>
           <van-icon name="arrow-left" size="22" color="#fff" @click="onClickLeft"/>
        </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'subnavBar',
  data() {
    return {}
  },
  methods: {
    onClickLeft() {
      this.$router.back()
    },
    onClickRight() {
      this.$router.push('/home')
    },
  },
  computed:{
    title(){
        return this.$route.meta.title
    }
  }
}
</script>

<style lang="scss" scoped>
.subnavBar {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
    .van-nav-bar{
        background-color:#111214;
    }
    
}
.subnavBar ::v-deep {
  .van-nav-bar__title {
      color:#fff
    }
}
</style>
